/*
 * CS_DEATH_REQ.cpp
 *
 *  Created on: 2013. 5. 21.
 *      Author: the2
 */


#include "../../User.h"
#include "CS_DEATH_REQ.h"

#include "../../NLogic/Space.h"

namespace ProjectZ { namespace NCommand { namespace NBattle {

void CS_DEATH_REQ::OnExecute(User * pUser, ::Network::Packet * pPacket)
{
	NLogic::Space * pSpace = pUser->GetSpace();
	if (NULL == pSpace)
	{
		return;
	}

	PREPARE_PACKET;

	int gid = 0;
	int ismonster = 0;

	pPacket->ParseMsg("%d%c", &gid, &ismonster);

	::Network::Packet * pNoti = ::Network::GETPACKETPOOL()->SEND_NEW();
	pNoti->MsgCat("%d%c", gid, ismonster);
	pNoti->MakePacket(CMD_SC_DEATH_REQ);
	pSpace->SendAll(pNoti);
}

} /*NBattle*/ } /*NCommand*/ } /*ProjectZ*/
